package com.niguang.work.labour.api.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 地区
 * </p>
 *
 * @author 83673
 * @since 2018-11-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Area extends Model<Area> {

    public static final String ID = "id";
    public static final String AREA_NAME = "area_name";
    public static final String PID = "pid";
    public static final String ALIAS = "alias";
    public static final String PATH = "path";
    public static final String LEVEL = "level";
    public static final String CREATE_TIME = "create_time";
    public static final String UPDATE_TIME = "update_time";
    public static final String UPDATE_USER_ID = "update_user_id";
    public static final String DELETED = "deleted";
    private static final long serialVersionUID = 1L;
        /**
     * 地区编号
     */
         private Integer id;
        /**
     * 名称
     */
         private String areaName;
        /**
     * 父级id
     */
         private Integer pid;
        /**
     * 别名
     */
         private String alias;
        /**
     * 路径
     */
         private String path;
        /**
     * 级别
     */
         private Integer level;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    private Long updateUserId;
    @TableLogic
    private Boolean deleted;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
